﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD><TITLE>CoordMode</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8"><LINK 
href="../css/commands.css" type=text/css rel=stylesheet><LINK media=print 
href="../css/print.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<H1>CoordMode</H1>


<P>为一些命令设置相对于激活窗口或屏幕的坐标模式。</P>
<P class=CommandSyntax>CoordMode, ToolTip|Pixel|Mouse|Caret|Menu [, 
Screen|Relative]</P>
<h3>参数 </h3>
<TABLE borderColor=#c0c0c0 cellSpacing=0 cellPadding=3 width="100%" border=1>
  <TBODY>
  <TR>
    <TD width="15%">Param1</TD>
    <TD width="85%">
      <P><STRONG>ToolTip</STRONG>: 影响 <A 
      href="ToolTip.htm">ToolTip</A>&nbsp;。</P>
      <P><STRONG>Pixel</STRONG>: 影响 <A 
      href="PixelGetColor.htm">PixelGetColor</A>&nbsp;、<A 
      href="PixelSearch.htm">PixelSearch</A>&nbsp;和 <A 
      href="ImageSearch.htm">ImageSearch</A>&nbsp;。</P>
      <P><STRONG>Mouse</STRONG>: 影响 <A 
      href="MouseGetPos.htm">MouseGetPos</A>&nbsp;、<A 
      href="Click.htm">Click</A>&nbsp;和 <A href="MouseMove.htm">MouseMove</A>/<A 
      href="MouseClick.htm">Click</A>/<A 
      href="MouseClickDrag.htm">Drag</A>&nbsp;。</P>
      <P><STRONG>Caret</STRONG>: 影响内置变量 <A 
      href="../Variables.htm#Caret">A_CaretX</A>&nbsp;和 <A 
      href="../Variables.htm#Caret">A_CaretY</A>&nbsp;。</P>
      <P><STRONG>Menu</STRONG>: 当为 "<A href="Menu.htm">Menu</A> Show" 
      命令指定坐标时影响它。</P></TD></TR>
  <TR>
    <TD>Param2</TD>
    <TD>
      <P>如果省略 <EM>Param2</EM>&nbsp;，默认对屏幕。</P>
      <P><STRONG>Screen</STRONG>: 坐标相对于桌面(整个屏幕)。</P>
      <P><STRONG>Relative</STRONG>: 坐标相对于激活的窗口。</P></TD></TR></TBODY></TABLE>
<h3>注意</h3>
<P>如果此命令没有使用，除了那些文档上有说明的命令外，所有的命令(例如 <A href="WinMove.htm">WinMove</A>&nbsp;和 <A 
href="InputBox.htm">InputBox</A>) 都使用相对于激活窗口的坐标。</P>
<P>对于此命令来说，每个最近启动的 <A href="../misc/Threads.htm">thread</A> (例如一个 <A 
href="../Hotkeys.htm">hotkey</A>&nbsp;、<A href="Menu.htm">custom menu 
item</A>&nbsp;或 <A href="SetTimer.htm">timed</A> 子程序) 
以新的默认设置开始。这个默认设置可以通过在自动执行部分(脚本的顶部)使用此命令来改变。</P>
<h3>相关命令</h3>
<P><A href="Click.htm">Click</A>, <A href="MouseMove.htm">MouseMove</A>, <A 
href="MouseClick.htm">MouseClick</A>, <A 
href="MouseClickDrag.htm">MouseClickDrag</A>, <A 
href="MouseGetPos.htm">MouseGetPos</A>, <A 
href="PixelGetColor.htm">PixelGetColor</A>, <A 
href="PixelSearch.htm">PixelSearch</A>, <A href="ToolTip.htm">ToolTip</A>, <A 
href="Menu.htm">Menu</A> </P>
<h3>示例</h3><PRE class=NoIndent>CoordMode, ToolTip, Screen  <SPAN class=CodeCom>; 将 ToolTips 放置在相对于屏幕坐标的地方:</SPAN>
CoordMode, ToolTip  <SPAN class=CodeCom>; 和上面是一样的效果，因为 "screen" 是默认的。</SPAN></PRE>
</BODY></HTML>
